package io.github.lee.app.unsplash.repository

import io.github.lee.app.unsplash.repository.api.PhotoApi
import io.github.lee.app.unsplash.repository.domain.Photo
import io.github.lee.app.unsplash.repository.domain.UnsplashResponse
import io.github.lee.app.unsplash.repository.params.OrderBy
import javax.inject.Inject

class PhotoRepository @Inject constructor(private val api: PhotoApi) {

    suspend fun photos(
        page: Int, size: Int = 10,
        orderBy: OrderBy = OrderBy.Latest,
    ): UnsplashResponse<List<Photo>> =
        api.photos(page, size, orderBy.value)

}